<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/3/8
  Time: 13:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改权限</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <script src="/static/js/jquery-1.11.3.min.js" type="text/javascript"></script>

    <!--[if lt IE 9]>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/html5.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="col-sm-12">
    <form class="form-horizontal m-t" id="form" method="post"
          action="${pageContext.request.contextPath}/admin/auth_update.action">
        <input type="hidden" name="sid" value="${sysmenu.sid}">
        <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require">*</i>资源描述:</label>
            <div class="col-sm-8">
                <input class="form-control" name="mName" size="30" value="${sysmenu.mName}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require">*</i>备注名称:</label>
            <div class="col-sm-8">
                <input class="form-control" name="mcname" size="30" value="${sysmenu.mcname}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3  control-label">资源图标:</label>
            <div class="col-sm-8">
                <input class="form-control" name="mIcon" size="30" value="${sysmenu.mIcon}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require">*</i>菜单类型:</label>
            <div class="col-sm-8">
                <select name="type" id="type" class="form-control" onchange="typeChange()">
                    <option value="0">系统菜单</option>
                    <option value="1">APP积分</option>
                </select>
            </div>
        </div>
        <div class="form-group" id="mTypeDiv">
            <label class="col-sm-3  control-label"><i class="require">*</i>资源类型:</label>
            <div class="col-sm-8">
                <select name="mType" id="mType" class="form-control">
                    <option value="1">模块</option>
                    <option value="2">菜单</option>
                    <option value="3">原子菜单</option>
                    <option value="4">按钮</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3  control-label">资源url:</label>
            <div class="col-sm-8">
                <input class="form-control" name="mUrl" size="30" value="${sysmenu.mUrl}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require">*</i>排序:</label>
            <div class="col-sm-8">
                <input class="form-control" name="mSort" size="30" value="${sysmenu.mSort}"/>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#mType").val('${sysmenu.mType}');
        $("#type").val('${sysmenu.type}');
        if('${sysmenu.type}'=='1'){
        	$("#mTypeDiv").attr("style","display:none");
        }
    });
    function typeChange() {
    	var select = $("#type").val();
    	if(select == 0){
    		$("#mTypeDiv").attr("style","");
    	}else{
    		$("#mTypeDiv").attr("style","display:none");
    		$("#mType").val('2');
    	}
    }
</script>
</body>
</html>
